#include "aboutdialog.h"
#include "ui_aboutdialog.h"

#include <QDebug>
#include <QCoreApplication>
#include <QDesktopServices>
#include <QUrl>

AboutDialog::AboutDialog(QWidget *parent) :
  MouseMovableDialog(parent),
  ui(new Ui::AboutDialog)
{
  ui->setupUi(this);
  ui->versionLabel->setText(QCoreApplication::applicationVersion());
  ui->qrcodeLabel->setVisible(false);


  connect(ui->gotoWebPageButton, &QPushButton::clicked, this, &AboutDialog::gotoWebPage);

  setupQuitButton();

  qDebug() << "显示关于信息";
}

AboutDialog::~AboutDialog()
{
  delete ui;
}


void AboutDialog::gotoWebPage()
{
  QDesktopServices::openUrl(QUrl("https://gitee.com/xiii_1991/FFFever"));
}



void AboutDialog::showMe(QWidget *parent)
{
  AboutDialog* about = new AboutDialog(parent);
  about->show();
}
